package cn.hiapi.shopkeeper.jpa.user;

import cn.hiapi.basic.jpa.BasicRepository;
import cn.hiapi.shopkeeper.entity.user.HistoryRecord;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

/**
 * @author AdinZ
 * @date 2022/12/31 21:55
 */
public interface HistoryRecordJpa extends BasicRepository<HistoryRecord,Long> {

    @Modifying
    @Query("delete from HistoryRecord e where e.uid=?1")
    Integer deleteByUid(long uid);

    @Modifying
    @Query("delete from HistoryRecord e where  e.uid=?1 and e.id in ?2")
    Integer deleteByUid(long uid, Long[] id);
}
